import request from '@/config/axios'

export interface DivideVO {
  id: number
  code: string
  price: number
  judgeStatus: number
}

// 获得总分账统计
export const getDivideAllStatistics = async () => {
  return await request.get({ url: `/meijia/divide-all/get-statistics` })
}
// 获得分账金额结果分页
export const getDivideResultPage = async (params) => {
  return await request.get({ url: `/meijia/divide-result/pageResultCommonResult`, params })
}

// 获得分账金额结果分页
export const getSelfDivideResultPage = async (params) => {
  return await request.get({ url: `/meijia/divide-result/pageResultCommonResultSelf`, params })
}

// 修改用户
export const updateResultByCode = async (data) => {
  return await request.put({ url: `/meijia/divide-result/updateResultByCode`, data })
}


// 获得总分账关联订单列表
export const getDivideOrderPageByAllCode = async (params) => {
  return await request.get({ url: `/meijia/divide-order/getDivideOrderPageByAllCode`,params })
}
// // 获得订单分账详情
export const getDivideByOrderCode = async (params) => {
  return await request.get({ url: `/meijia/divide/getDetailByOrderCode`,params })
}
// 获得总分账关联人员列表
export const getDivideResultByUser = async (params) => {
  return await request.get({ url: `/meijia/divide-result/getUserDetail`,params })
}

// 获得总分账关联人员列表
export const getDetailByOrderCodeAndAllCode = async (params) => {
  return await request.get({ url: `/meijia/divide/getDetailByOrderCodeAndAllCode`,params })
}
// 获得总分账关联人员列表
export const getOrderUserDetailRespVOPage = async (params) => {
  return await request.get({ url: `/meijia/order-user/getOrderUserDetailRespVOPage`,params })
}
// 查询分账结果
export const getResultCommonResult = async (params) => {
  return await request.get({ url: `/meijia/divide-result/getResultCommonResult`,params })
}
// 获得总分账关联人员列表
export const getSelfOrderUserDetailRespVOPage = async (params) => {
  return await request.get({ url: `/meijia/order-user/getOrderUserDetailRespVOPage`,params })
}
// 获得分账金额分页
export const getDividePage = async (params) => {
  return await request.get({ url: `/meijia/divide/page`, params })
}
// 导出总分账明细
export const exportDivide = async (params) => {
  return await request.download({ url: `/meijia/divide/export-excel`, params })
}